<template>
  <div>
    <div class="description">
      <p class="title">请选择行业</p>
      <!--<div class="btn">-->
        <!--<router-link to="/quote/step1" class="back">返回上一步</router-link>-->
      <!--</div>-->
      <button class="btn" @click="goBack">返回上一步</button>
    </div>
    <div class="form">
      <ul class="plat-forms clearfix system">
        <li v-for="item in list" :key="item.id">
          <a class="link" @click="clciFn(item.id)">
            <div class="icon icon-food"></div>
            <em>{{item.name}}</em>
          </a>
        </li>
      </ul>
    </div>

  </div>
</template>

<script>
  import axios from 'axios'
  export default{
    name:'step2',
    created: function() {
          var that=this;
          axios.post(this.HOST+'/api/Index/getAppIndustry')
              .then(function (response) {
                  var info=response.data.data.info;
                  that.list=info;
              })
              .catch(function (response) {
                  console.log(response);
              });
    },
    data() {
      return {
          list: [],
      }
    },
    methods: {
      goBack() {
        this.$router.go(-1);
      },
     clciFn(id){
            localStorage.setItem('hid',id);
            this.$router.push({path:'/quote/step2list'});
      },
    }
  }
</script>

<style scoped>

  .description {
    margin: 2rem auto;
    max-width: 980px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .description p.title {
    color: #2d3238;
    font-weight: 200;
    font-size: 2.4rem;
    margin: 0 0 1rem;
  }
  .description .btn {
    width: 20%;
    height: 4.1rem;
    line-height: 4.1rem;
    font-size: 1.5rem;
    min-width: 17rem;
    background: #4289db;
    color: #fff;
    cursor: pointer;
    border-radius: .4rem;
    border: 0;
    box-shadow: 0 3px 3px rgba(45,51,56,.2);
    text-align: center;
  }
  .description .btn .back {
    color: #fff;
    display: inline-block;
    width: 100%;
    height: 100%;
  }
  .form {
    margin: 110px auto 80px;
  }
  .form .plat-forms {
    list-style: none;
    padding: 0;
    margin: 00px auto;
    max-width: 980px;
  }
  .plat-forms li {
    width: calc((100% - 2 * 1.7rem) / 3);
    padding: 1rem;
    position: relative;
    height: 11.6rem;
    margin: 0 1.1rem 1rem 0;
    float: left;
    color: #979fa8;
    cursor: pointer;
    background: #fff;
    border-radius: .4rem;
    text-align: center;
    overflow: hidden;
  }
  .plat-forms li:hover {
    background: #4289db;
    color: #fff;
  }
  .plat-forms.system li {
    width: calc((100% - 3 * 1.7rem) / 4);
  }

  .plat-forms li em {
    display: block;
    font-style: normal;
    font-size: 1rem;
    color: inherit;
    line-height: 1.2rem;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2rem;
    text-align: center;
    margin-top: 1rem;
  }
  .plat-forms li div.icon {
    height: 6rem;
    margin-top: 0.2rem;
  }
  .plat-forms li div.icon-food {
    background: url("../../assets/img/step1_food.png") no-repeat center;
  }
  .plat-forms li div.icon-tech {
    background: url("../../assets/img/step1_tech.png") no-repeat center;
  }
  .plat-forms li div.icon-business {
    background: url("../../assets/img/step1_business.png") no-repeat center;
  }
  .plat-forms li div.icon-sports {
    background: url("../../assets/img/step1_sports.png") no-repeat center;
  }

  .plat-forms li:hover div.icon-food {
    background: url("../../assets/img/step1_food_hover.png") no-repeat center;
  }
  .plat-forms li:hover div.icon-tech {
    background: url("../../assets/img/step1_tech_hover.png") no-repeat center;
  }
  .plat-forms li:hover div.icon-business {
    background: url("../../assets/img/step1_business_hover.png") no-repeat center;
  }
  .plat-forms li:hover div.icon-sports {
    background: url("../../assets/img/step1_sports_hover.png") no-repeat center;
  }

  .plat-forms.single li p {
    font-size: 1rem;
    line-height: 1.5rem;
  }
  .plat-forms.single li p:first-child {
    margin-top: 2rem;
    font-size: 1.4rem;
    line-height: 2.5rem;
  }
  .plat-forms li .link {
    display: inline-block;
    width: 100%;
    height: 100%;
    color: #979fa8;
  }
  .plat-forms li:hover .link {
    color: #fff;
  }
</style>
